package com.szrt.day20170505.ch04;


import org.junit.Test;

public class BTreeTest {
	
	
	@Test
	public void testName() throws Exception {
		
		
		Node root = new Node(5);
		
		
		BTree tree = new BTree(root);
		
		
		Node n3 = new Node(3);
		tree.addNode(root,n3);
		
		
		Node n7 = new Node(7);
		tree.addNode(root,n7);
		
		Node n2 = new Node(2);
		tree.addNode(root,n2);
		
		Node n4 = new Node(4);
		tree.addNode(root,n4);
		
		Node n8 = new Node(8);
		tree.addNode(root,n8);
		
		System.out.println(tree);
		
		//树ok
		//System.out.println(tree.findMax().getData());
		
		System.out.println("----------------------------------------");
		tree.printTree(root);
		
		
	}

}
